    // define the module we're working with
    // define the ctrl
    app.controller("loginController",["$http","$scope","$location",function ($http,$scope,$location) {
  

       $scope.login = function(){
            x = $scope.form;
            $http({method: 'POST', url: '/login',data:x}).
          success(function(data, status, headers, config) {
            if(status == 200)
            {
              window.location.href = "rooms.html";
              //$location.path("rooms");

            }

          }).
          error(function(data, status, headers, config) {
          	console.log("aaa");
            // called asynchronously if an error occurs
            // or server returns response with an error status.
          });
        }
    }]);


 /*app.controller("loginController", [ "$http", "$scope", function ( $http, $scope ){
    


}]);*/

